计算平台的评价:算力/带宽 

1. 算力

算力 :也称为计算平台的性能上限,指的是一个计算平台倾尽全力每秒钟所能完成的浮点运算数。
计算能力越强大,速度越快。衡量计算能力的单位是 flops、FLOPS 或者 FLOP/s (floating point operations per second,每秒能执行的flop数量)1

$$FLOPS_{core}=\frac{cores}{node} \times \frac{nodes}{system}\times\frac{cycles}{second} \times \frac{FLOPs}{cycles}$$

$$ 浮点性能参考指标 (FLOPS) = 总运算核心数 \times 每周期运算次数 \times 处理器相对运作频率$$

示例

  1. 对于intel xeon e7-8837的理论flops计算是:
    $$2.66(主频,GHz)×8(核心)×4(每周期浮点运算次数)=85.12 GFLOPS$$

  2. 对于AMD opteron 6220的峰值flops:
    $$3(主频,GHz)×8(核心)×4(每周期浮点运算次数)=96 GFLOPS$$

每周期浮点运算次数的说明
目前前大多数的理论峰值的每周期运算次数是按照x4的来计算,因为通常cpu核可以一拍执行两条指令,每条指令可以执行两个操作,因此是x4

intel 新架构的处理器增加了新的指令集AVX,因此一条指令可以执行四个操作,故新架构的处理器x8,也就说支持新指令集AVX的intel处理器都是x8

新架构sandy bridge和ivy bridge都是x8。 服务器处理器E5-XXXX, E3-XXXX都是x8

计算性能 2

Name Unit Value Leve 设备 FLOPS(单精度)
kiloFLOPS kFLOPS 103 千级 ENIAC (1946年) 0.3 kFLOPS
megaFLOPS MFLOPS 106 百万级 Raspberry Pi CM2708 316.56 MFLOPS
gigaFLOPS GFLOPS 109 十亿级 Intel Core i7 965 69.23 GFLOPS
teraFLOPS TFLOPS 1012 万亿级(兆级) Microsoft Xbox One X 6 TFLOPS
NVIDIA GeForce GTX Titan X 7 TFLOPS
NVIDIA Tesla K80 8.74 TFLOPS
NVIDIA Tesla V100 PCIe 16 GB 14.1 TFLOPS
NVIDIA Tesla T4 260 TFLOPS
petaFLOPS PFLOPS 1015 千万亿(千兆级) 神威太湖之光 93.01 PFLOPS
天河二号 33.86 PFLOPS
exaFLOPS EFLOPS 1018 百京级 比特币全网算力 2018年 35 EFLOPS
zettaFLOPS ZFLOPS 1021
yottaFLOPS YFLOPS 1024

设备算力表

设备 算力 FP32 (float) 备注
NVIDIA GeForce 940MX 0.74 TFLOPS 小米笔记本
NVIDIA Quadro P620 1.35 TFLOPS
NVIDIA Tesla K40 5 TFLOPS
NVIDIA Tesla P4 5.4 TFLOPS 【滴滴云 P4】
NVIDIA Tesla K80 8.74 TFLOPS Colab GPU基础版本
NVIDIA GeForce GTX Titan X 7 TFLOPS
NVIDIA Tesla P100 PCIe 16 GB 9.3 TFLOPS Kaggle
NVIDIA Tesla V100 PCIe 16 GB 14.1 TFLOPS 百度 AI Studio
NVIDIA Tesla T4 260 TFLOPS Colab GPU高级版本
Google Colab Cloud TPU 180 TFLOPs

Google Colab Cloud CPU 1 stocks 4 cores 2.2G

参考资料:https://en.wikipedia.org/wiki/Nvidia_Tesla

2. 带宽

带宽$\beta$:即计算平台的带宽上限,指的是一个计算平台倾尽全力每秒所能完成的内存交换量,单位是Byte/s

【滴滴云 P4】 24637.1MB/s

:这里所说的 内存 是广义上的内存。对于CPU计算平台而言指的就是真正的内存;而对于GPU计算平台指的则是显存。

3. 计算强度上限

计算强度上限$I_{max}$:描述的是在这个计算平台上,单位内存交换最多用来进行多少次计算,单位是FLOP/Byte
$$I_{max}=\frac{\pi}{\beta}=\frac{算例}{宽带}$$
两个指标相除即可得到计算平台的计算强度上限

【滴滴云 P4】 5.510001000/24637.1MB/s =223

4. 参考资料


  1. https://en.wikichip.org/wiki/flops 

  2. https://wikivisually.com/wiki/FLOPS 


如果你觉得这篇文章对你有帮助,不妨请我喝杯咖啡,鼓励我创造更多!